home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / AniConstraintsMenu.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  6.7 KB  |  212 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. // Alias|Wavefront Script File
  19. // MODIFY THIS AT YOUR OWN RISK
  20. //
  21. // Creation Date:  13 April 1997
  22. // Author:         gf
  23. //
  24. //
  25. //  Procedure Name:
  26. //      AniConstraintsMenu
  27. //
  28. //  Description:
  29. //        Create the ANIMATION->Constraints menu
  30. //
  31. //  Input Arguments:
  32. //      parent to parent the menu to.
  33. //
  34. //  Return Value:
  35. //      None.
  36. //
  37.  
  38. global proc AniConstraintsMenuAddPoleVector( string $parent )
  39. //
  40. //    Description:
  41. //        A proc to add the poleVectorConstraint to the AniConstraints menu.
  42. //        This does not check for the existance of the poleVectorConstraint
  43. //        menu item.
  44. //
  45. //        This proc will only get called after AniConstraintsMenu, therefore
  46. //        this proc will exist when it is needed.
  47. //
  48. //        initialKinUI.mel depends on the menu item having poleVectorConstraint
  49. //        in its name.
  50. {
  51.     setParent -m $parent;
  52.  
  53.     if (`exists ikSystem` != 0) {
  54.         menuItem -divider true;
  55.         menuItem -l "Pole Vector" 
  56.             -annotation "Pole Vector Constraint: Select one or more targets followed by the Rotate Plane ikHandle to constrain"
  57.             -dmc "performPoleVectorConstraint 2" 
  58.             -c "PoleVectorConstraint"
  59.             -i "poleVectorConstraint.xpm"
  60.             poleVectorConstraintItem;
  61.         menuItem -optionBox true
  62.             -annotation "Pole Vector Constraint Option Box"
  63.             -l "Pole Vector Option Box"
  64.             -c "PoleVectorConstraintOptions"
  65.             -i "poleVectorConstraint.xpm" 
  66.             poleVectorConstraintOptionItem;
  67.     }
  68. }
  69.  
  70. global proc AniConstraintsMenu( string $parent )
  71. {
  72.     setParent -m $parent;
  73.     if( `menu -q -ni $parent` != 0 ) {
  74.         //
  75.         //    Menu is built already - just return
  76.         //
  77.         return;
  78.     }
  79.  
  80.     menuItem -l "Point" 
  81.         -annotation "Point Constraint: Select one or more targets followed by the object to constrain"
  82.         -dmc "performPointConstraint 2"
  83.         -c "PointConstraint"
  84.         -i "posConstraint.xpm"
  85.         pointConstraintItem;
  86.         menuItem -optionBox true
  87.             -annotation "Point Constraint Option Box"
  88.             -l "Point Option Box"
  89.             -i "posConstraint.xpm"
  90.             -c "PointConstraintOptions"
  91.             pointConstraintOptionItem;
  92.  
  93.     menuItem -l "Aim" 
  94.         -annotation "Aim Constraint: Select one or more targets followed by the object to constrain"
  95.         -dmc "performAimConstraint 2"
  96.         -c "AimConstraint"
  97.         -i "aimConstraint.xpm"
  98.         aimConstraintItem;
  99.         menuItem -optionBox true        
  100.             -annotation "Aim Constraint Option Box"    
  101.             -l "Aim Option Box"
  102.             -c "AimConstraintOptions"
  103.             -i "aimConstraint.xpm"
  104.             aimConstraintOptionItem;
  105.  
  106.     menuItem -l "Orient" 
  107.         -annotation "Orient Constraint: Select one or more targets followed by the object to constrain"
  108.         -dmc "performOrientConstraint 2"
  109.         -c "performOrientConstraint 0"
  110.         -i "orientConstraint.xpm"
  111.         orientConstraintItem;
  112.         menuItem -optionBox true
  113.             -annotation "Orient Constraint Option Box"
  114.             -l "Orient Option Box"
  115.             -c "OrientConstraintOptions"
  116.             -i "orientConstraint.xpm"
  117.             orientConstraintOptionItem;
  118.         
  119.     menuItem -l "Scale" 
  120.         -annotation "Scale Constraint: Select one or more targets followed by the object to constrain"
  121.         -dmc "performScaleConstraint 2"
  122.         -c "ScaleConstraint"
  123.         -i "scaleConstraint.xpm"
  124.         scaleConstraintItem;
  125.         menuItem -optionBox true
  126.             -annotation "Scale Constraint Option Box"
  127.             -l "Scale Option Box"
  128.             -c "ScaleConstraintOptions"
  129.             -i "scaleConstraint.xpm"
  130.             scaleConstraintOptionItem;
  131.         
  132.     menuItem -l "Parent" 
  133.         -annotation "Parent Constraint: Select one or more targets followed by the object to constrain"
  134.         -dmc "performParentConstraint 2"
  135.         -c "ParentConstraint"
  136.         -i "parentConstraint.xpm" 
  137.         parentConstraintItem;
  138.         menuItem -optionBox true
  139.             -annotation "Parent Constraint Option Box"
  140.             -l "Parent Option Box"
  141.             -c "ParentConstraintOptions"
  142.             -i "parentConstraint.xpm"
  143.             parentConstraintOptionItem;
  144.         
  145.     menuItem -divider true;
  146.  
  147.     menuItem -l "Geometry" 
  148.         -annotation "Geometry Constraint: Select one or more targets followed by the object to constrain"
  149.         -dmc "performGeometryConstraint 2"
  150.         -c "GeometryConstraint"
  151.         -i "geometryConstraint.xpm"
  152.         geometryConstraintItem;
  153.         menuItem -optionBox true
  154.             -annotation "Geometry Constraint Option Box"
  155.             -l "Geometry Option Box"
  156.             -i "geometryConstraint.xpm"
  157.             -c "GeometryConstraintOptions"
  158.             geometryConstraintOptionItem;
  159.  
  160.     menuItem -l "Normal" 
  161.         -annotation "Normal Constraint: Select one or more targets followed by the object to constrain"
  162.         -dmc "performNormalConstraint 2"
  163.         -c "performNormalConstraint 0"
  164.         -i "normalConstraint.xpm"
  165.         normalConstraintItem;
  166.         menuItem -optionBox true
  167.             -annotation "Normal Constraint Option Box"
  168.             -l "Normal Option Box"
  169.             -i "normalConstraint.xpm"
  170.             -c "NormalConstraintOptions"
  171.             normalConstraintOptionItem;
  172.  
  173.     menuItem -l "Tangent" 
  174.         -annotation "Tanget Constraint: Select one or more targets followed by the object to constrain"
  175.         -dmc "performTangentConstraint 2"
  176.         -c "TangetConstraint"
  177.         -i "tangentConstraint.xpm"
  178.         tangentConstraintItem;
  179.         menuItem -optionBox true
  180.             -annotation "Tanget Constraint Option Box"
  181.             -l "Tanget Option Box"
  182.             -i "tangentConstraint.xpm"
  183.             -c "TangetConstraintOptions"
  184.             tangentConstraintOptionItem;
  185.  
  186.     AniConstraintsMenuAddPoleVector($parent);
  187.  
  188.     menuItem -divider true;
  189.     
  190.     menuItem -l "Remove Target"
  191.         -annotation "Remove Target: Select target to remove followed by the constrained object."
  192.         -dmc "performRemoveConstraintTarget 2"
  193.         -c "RemoveConstraintTarget"
  194.         removeConstraintTargetItem;
  195.         menuItem -optionBox true
  196.             -annotation "Remove Constraint Target Option Box"
  197.             -l "Remove Constraint Target Option Box"
  198.             -c "RemoveConstraintTargetOptions"
  199.             removeConstraintTargetOptionItem;
  200.  
  201.     menuItem -l "Set Rest Position"
  202.         -annotation "Set Rest Position: Select constrained object."
  203.         -c "setConstraintRestPosition"
  204.         setRestPositionItem;
  205.         
  206.     menuItem -l "Modify Constrained Axis..."
  207.         -annotation "Modify Constrained Axis: Select constrained object."
  208.         -dmc "performModifyConstraintAxes 2"
  209.         -c "ModifyConstraintAxisOptions"
  210.         modifyConstraintAxisItem;
  211. }
  212.